package com.eightbears.beboy.ui.user.activity;

import android.os.Bundle;
import android.view.WindowManager;

import com.eightbears.beboy.R;
import com.eightbears.beboy.base.BaseActivity;
import com.eightbears.beboy.base.view.SwipeBackLayout;
import com.eightbears.beboy.ui.chat.ui.fragment.ContactListFragment;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 通讯录Activity
 */
public class ContactsListActivity extends BaseActivity {

    @BindView(R.id.sw_finish)
    SwipeBackLayout sw_finish;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_contacts_list);
        getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE |
                WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
        initView();
        initData();
        initEvent();
    }

    @Override
    protected void initView() {
        ButterKnife.bind(this);
        replaceFragment(R.id.frame_container, new ContactListFragment());
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void initEvent() {
        sw_finish.setCallBack(new SwipeBackLayout.CallBack() {
            @Override
            public void onFinish() {
                finish();
            }
        });
    }
}
